<!-- HomenTabTableShow -->
<template>
  <div id="HomenTabTableShow">
    <el-card class="box-card" shadow="hover">
      <el-table :data="tableData" border tyle="width: 100%">
        <el-table-column label="课程" align="center">
          <template slot-scope="scope">
            {{ scope.row.name ? scope.row.name : '/' }}
          </template>
        </el-table-column>
        <el-table-column label="今日购买" align="center">
          <template slot-scope="scope">
            {{ scope.row.todayBuy ? scope.row.todayBuy : '/' }}
          </template>
        </el-table-column>
        <el-table-column label="本月购买" align="center">
          <template slot-scope="scope">
            {{ scope.row.monthBuy ? scope.row.monthBuy : '/' }}
          </template>
        </el-table-column>
        <el-table-column label="总购买" align="center">
          <template slot-scope="scope">
            {{ scope.row.totalBuy ? scope.row.totalBuy : '/' }}
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
  name: 'HomenTabTableShow',
  props: {
    tableData: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {

    }
  },
  /* HTML DOM加载后马上执行的，如赋值*/
  computed: {},

  /* 观察Vue实例上的数据变动 */
  watch: {},

  /* 模板渲染成html前调用，即通常初始化某些属性值，然后再渲染成视图 */
  created() {},

  /* 模板渲染成html后调用，通常是初始化页面完成后，再对html的dom节点进行一些需要的操作 */
  mounted() {},

  /* methods则必须要有一定的触发条件才能执行 */
  methods: {}
}
</script>

<style lang='scss' scoped>

</style>
